/**
 * 
 */
package com.pmsco.pms.services.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.pmsco.pms.core.dao.PmsMenuRoleDao;
import com.pmsco.pms.core.domain.PmsMenuRole;
import com.pmsco.pms.services.interfaces.PmsMenuRoleService;

/**
 * @author Long Tran
 *
 */
public class PmsMenuRoleServiceImpl implements PmsMenuRoleService {
	private static final Logger logger = LoggerFactory.getLogger(PmsMenuRoleServiceImpl.class);
	
	private static PmsMenuRoleDao pmsMenuRoleDao;
	
	public void saveOrUpdatePmsMenuRole(PmsMenuRole pmsMenuRole) {
		pmsMenuRoleDao.saveOrUpdatePmsMenuRole(pmsMenuRole);
	}

	public List<PmsMenuRole> listPmsMenuByRole(PmsMenuRole searchTemplate) {
		return pmsMenuRoleDao.listPmsMenuByRole(searchTemplate);
	}
	
	public List<PmsMenuRole> loadPmsMenuRoleByMenuId(Long menuId) {
		return pmsMenuRoleDao.loadPmsMenuRoleByMenuId(menuId);
	}
	
	public PmsMenuRole loadPmsMenuRole(PmsMenuRole searchTemplate) {
		return pmsMenuRoleDao.loadPmsMenuRole(searchTemplate);
	}
	
	public void deletePmsMenuRole(PmsMenuRole pmsMenuRole) {
		pmsMenuRoleDao.deletePmsMenuRole(pmsMenuRole);
	}
	
	/**
	 * @param pmsMenuRoleDao the pmsMenuRoleDao to set
	 */
	public void setPmsMenuRoleDao(PmsMenuRoleDao pmsMenuRoleDao) {
		logger.info("Start setPmsMenuRoleDao");
		logger.debug("PMS Menu Role Dao: " + pmsMenuRoleDao);
		this.pmsMenuRoleDao = pmsMenuRoleDao;
		logger.info("End setPmsMenuRoleDao");
	}

}
